package com.cate.result;

/**
 * @CreateTime: 2023/6/27
 * @Author: <==lhd==>
 * @Description:
 */
public enum SystemCode {
    /**
     * SUCCESS
     */
    SUCCESS(1, "ok"),

    /**
     * AccessTokenError
     */
    ACCESS_TOKEN_ERROR(40000, "用户登录令牌失效"),

    /**
     * NOT_LOGIN_ERROR
     */
    NOT_LOGIN_ERROR(40100, "用户未登录"),

    /**
     * AUTH_ERROR
     */
    AUTH_ERROR(40200, "用户名或密码错误"),

    /**
     * INNER_ERROR
     */
    INNER_ERROR(50000, "系统内部错误"),

    /**
     * 请求错误
     */
    REQUEST_ERROR(50001, "请求错误"),


    /**
     * file upload error
     */
    UPLOAD_ERROR(50001, "上传文件失败"),

    /**
     * ParameterValidError
     */
    PARAMETER_VALID_ERROR(50100, "参数验证错误"),

    /**
     * AccessDenied
     */
    ACCESS_DENIED(50200, "用户无权限访问");


    /**
     * The Code.
     */
    private final int code;

    /**
     * The Message.
     */
    private final String message;

    SystemCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * Gets code.
     *
     * @return the code
     */
    public int getCode() {
        return code;
    }

    /**
     * Gets message.
     *
     * @return the message
     */
    public String getMessage() {
        return message;
    }
}
